<div class="page-header">
							<h1>
								问卷名： <?php echo $sur->name ;?> 
								<small>
									<i class="icon-double-angle-right"></i>
									参加人数： <?php echo $sur->attendnum; ?>
								</small>
							</h1>
</div>
	<div class="row">
		<div class="col-xs-12">
				<?php
				     $qus = $sur->questions;
					 $i = 1;
				     foreach($qus as $q){
						 if($q->type == 'danxuan'){
						echo '
						<div class="row">
                         <div class="col-sm-6 col-sm-offset-3">
										<div class="widget-box">
											<div class="widget-header widget-header-flat">
												<h4 class="smaller">
													（'.$i++.'）.'.$q->name.'
												</h4>
											</div>

											<div class="widget-body">
												<div class="widget-main">
													
													<div class="row">
														<div class="col-xs-12">
															<table class="table table-striped">
															  <thead>
																<tr>
																  <th>选项</th>
																  <th>参选人数</th>
																  <th>比例</th>
																</tr>
															  </thead>
															  <tbody>';
															  $con = json_decode($q->content);
															  $sta = json_decode($q->statistic);
															 foreach($sta as $key => $value){
																if($sur->attendnum == 0){
																    $per = 0;	
																}else{
																	$per = (int)$value/(int)$sur->attendnum*100;
																}
																echo '<tr>
																  <td>'.$con->$key.'</td>
																  <td>'.$value.'</td>
																  <td>'.$per.'%</td>
																 
																</tr>';
															 }
															
															echo	
															  '</tbody>
															</table>
														</div>
													</div>

												</div>
											</div>
										</div>
									</div>
						</div>';
						 }else if($q->type == 'duoxuan'){
						echo '<div class="row">
                                  <div class="col-sm-6 col-sm-offset-3">
										<div class="widget-box">
											<div class="widget-header widget-header-flat">
												<h4 class="smaller">
													（'.$i++.'）.'.$q->name.'
												</h4>
											</div>

											<div class="widget-body">
												<div class="widget-main">
													
													<div class="row">
														<div class="col-xs-12">
															<table class="table table-striped">
															  <thead>
																<tr>
																  <th>选项</th>
																  <th>参选次数</th>
																  <th>比列</th>
																  
																</tr>
															  </thead>
															  <tbody>';
															    $con = json_decode($q->content);
															  $sta = json_decode($q->statistic);
															   /*$totalValue = 0;
															   foreach($sta as $key => $value){
																  $totalValue += $value; 
																
															   }*/
															 foreach($sta as $key => $value){
																$per = 0;
																if($value !== 0){
																	$per = (int)$value/(int)$sur->attendnum*100;
																}
																echo '<tr>
																  <td>'.$con->$key.'</td>
																  <td>'.$value.'</td>
																  <td>'.$per.' % </td>
																  
																 
																</tr>';
															 }
																
														echo
															  '</tbody>
															</table>
														</div>
													</div>

												</div>
											</div>
										</div>
									</div>
						</div>';
						 }else if($q->type == 'tiankong'){
						echo 
						'<div class="row">
									<div class="col-sm-6 col-sm-offset-3">
										<div class="widget-box">
											<div class="widget-header widget-header-flat">
												<h4 class="smaller">
													（'.$i++.'）.'.$q->name.'
												</h4>
											</div>

											<div class="widget-body">
												<div class="widget-main">
													
													<div class="row">
														<div class="col-xs-12">
															<table class="table table-striped">
															  <thead>
																<tr>
																  <th>编号</th>
																  <th>答案</th>
																  
																</tr>
															  </thead>
															  <tbody>';
																$bf = $q->blankfillitems;
																$j = 1;
																foreach($bf as $b){
																echo '<tr>
																  <td>'.$j++.'</td>
																  <td>'.$b->content.'</td>
																 
																 
																</tr>';
																}
															 echo ' </tbody>
															</table>
														</div>
													</div>

												</div>
											</div>
										</div>
									</div>
						 </div>';
						 }
					  }
						?>
					</div>
				</div>	